package com.wayne.security.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

@RestController
public class IndexController {
    @GetMapping("/hello")
    public String hello() {
        return "hello";
    }

    @GetMapping("/principal")
    public Principal principal(Principal principal) {
        return principal;
    }

    @GetMapping("/admin/user")
    public String adminUser() {
        return "user";
    }

    @GetMapping("/user/user")
    public String userUser() {
        return "user";
    }

    @GetMapping("/rememberme")
    public String rememberme() {
        return "rememberme";
    }
}
